package com.xijia.wuyouwallet.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.xijia.wuyouwallet.R;
import com.xijia.wuyouwallet.base.BaseActivity;

/**
 * Created by Administrator on 2017/8/3 0003.
 */

public class ReceiptyMoneyTvActivity extends BaseActivity implements View.OnClickListener{

    private ImageView receipty_moneytw_back;
    private TextView receipty_moneytw_money,receipty_moneytw_sure_tv;

    private ImageView receipty_moneytw_img;
    private LinearLayout receipty_moneytw_sure_ll;


    private String money;
    private String type;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_receipty_moneytw);
        initView();
    }

    private void initView(){
        receipty_moneytw_back = (ImageView) findViewById(R.id.receipty_moneytw_back);
        receipty_moneytw_back.setOnClickListener(this);
        receipty_moneytw_money = (TextView) findViewById(R.id.receipty_moneytw_money);
        receipty_moneytw_img = (ImageView) findViewById(R.id.receipty_moneytw_img);
        receipty_moneytw_sure_tv = (TextView) findViewById(R.id.receipty_moneytw_sure_tv);
        receipty_moneytw_sure_ll = (LinearLayout) findViewById(R.id.receipty_moneytw_sure_ll);
        receipty_moneytw_sure_ll.setOnClickListener(this);

        money = getIntent().getStringExtra("money");
        type = getIntent().getStringExtra("type");

        //
        receipty_moneytw_money.setText(money);

        //类型
        if (type.equals("1")){
            receipty_moneytw_sure_tv.setText("微信支付，立即到账(T+0)分享制");
            receipty_moneytw_img.setImageResource(R.mipmap.ic_rate_aliplay);
        }else if (type.equals("2")){
            receipty_moneytw_sure_tv.setText("支付宝支付，立即到账(T+0)分享制");
            receipty_moneytw_img.setImageResource(R.mipmap.ic_rate_weixin);
        }
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.receipty_moneytw_back:
                finish();
                break;
            case R.id.receipty_moneytw_sure_ll:
                /*Bundle bundle = new Bundle();
                bundle.putString("type",type);
                bundle.putString("money",money);
                jumpToPage(ReceiptyMoneythActivity.class,bundle);*/
                break;

        }
    }
}
